#include<bits/stdc++.h>
using namespace std;
int a,b,c;
int x[10010],y[10010];
int main(){
	freopen("color.in","r",stdin);
	freopen("color.out","w",stdout);
	for (int i=1;i<=a;i++){
		cin >>b;
		for (int j=1;j<=b;j++){
			cin >>x[j];
			c+=x[i];
		}
		cout <<c;
	}
	
	return 0;
}
